package com.cloud.wms.http;

import com.cloud.wms.config.HttpConfig;
import com.cloud.wms.entity.ContainerEntity;
import com.cloud.wms.entity.Page;
import com.cloud.wms.entity.UpdateInfoBean;
import com.cloud.wms.ui.data.entity.InventoryEntity;
import com.cloud.wms.ui.group.entity.BatchCommodityEntity;
import com.cloud.wms.ui.group.entity.BatchCountEntity;
import com.cloud.wms.ui.group.entity.CollectPlaceEntity;
import com.cloud.wms.ui.group.entity.GroupBatchInfoEntity;
import com.cloud.wms.ui.group.entity.ObtainBindEntity;
import com.cloud.wms.ui.group.entity.ObtainScanContainerEntity;
import com.cloud.wms.ui.group.entity.SamplingCommodityEntity;
import com.cloud.wms.ui.in.entity.InCommodityEntity;
import com.cloud.wms.ui.in.entity.InMarkCommodityEntity;
import com.cloud.wms.ui.in.entity.InMarkEntity;
import com.cloud.wms.ui.in.entity.InOrderEntity;
import com.cloud.wms.ui.in.entity.TaskDetailEntity;
import com.cloud.wms.ui.inside.entity.LackCommodityEntity;
import com.cloud.wms.ui.inside.entity.RecordGoodsEntity;
import com.cloud.wms.ui.inside.entity.ReplenishBindEntity;
import com.cloud.wms.ui.inside.entity.ReplenishCommodityEntity;
import com.cloud.wms.ui.inside.entity.ReplenishOrderEntity;
import com.cloud.wms.ui.inside.entity.ReplenishBatchEntity;
import com.cloud.wms.ui.inside.entity.ReplenishStateBean;
import com.cloud.wms.ui.inside.entity.RevertBatchEntity;
import com.cloud.wms.ui.inside.entity.TransferCommodityEntity;
import com.cloud.wms.ui.inside.entity.TransferUpEntity;
import com.cloud.wms.ui.main.entity.CommodityEntity;
import com.cloud.wms.ui.main.entity.MemberEntity;
import com.cloud.wms.ui.main.entity.PosEntity;
import com.cloud.wms.ui.main.entity.RemoteEntity;
import com.cloud.wms.ui.main.entity.RemoteLoginEntity;
import com.cloud.wms.ui.main.entity.TaskEntity;
import com.cloud.wms.ui.main.entity.TaskMenuEntity;
import com.cloud.wms.ui.main.entity.WarehouseEntity;
import com.cloud.wms.ui.print.entity.PrinterBoxEntity;
import com.cloud.wms.ui.returned.entity.ExpressDeliveryEntity;
import com.cloud.wms.ui.returned.entity.InventoryDetailEntity;
import com.cloud.wms.ui.returned.entity.InventoryInfoEntity;
import com.cloud.wms.ui.returned.entity.InvoiceEntity;
import com.cloud.wms.ui.returned.entity.RelayBoxEntity;
import com.cloud.wms.ui.sort.entity.BatchInfoEntity;
import com.cloud.wms.ui.sort.entity.BindInfoEntity;
import com.cloud.wms.ui.sort.entity.DetachBoxBean;
import com.cloud.wms.ui.sort.entity.DetachDetailBean;
import com.cloud.wms.ui.sort.entity.SortCommodityEntity;

import java.util.ArrayList;
import java.util.IdentityHashMap;
import java.util.List;

import io.reactivex.Observable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Response;
import retrofit2.http.Body;
import retrofit2.http.DELETE;
import retrofit2.http.Field;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.GET;
import retrofit2.http.Header;
import retrofit2.http.Headers;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.PUT;
import retrofit2.http.Part;
import retrofit2.http.Path;
import retrofit2.http.Query;
import retrofit2.http.QueryMap;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

import static com.cloud.wms.http.url.SiteHeader.WES_BATCH;
import static com.cloud.wms.http.url.SiteHeader.WES_GROUP;
import static com.cloud.wms.http.url.SiteHeader.WES_IN;
import static com.cloud.wms.http.url.SiteHeader.WES_INTERNAL;
import static com.cloud.wms.http.url.SiteHeader.WES_SORT;
import static com.cloud.wms.http.url.SiteHeader.WMS;

/**
 * Created by Tanghaibo
 * 2018/3/22
 * description: 网络请求api
 */

public interface HttpAPI {

    /**
     * 下载apk
     * url_type:download 下载接口
     *
     * @param url
     * @param identifier
     * @return
     */
    @GET
    @Streaming
    Observable<ResponseBody> downloadApk(@Url String url, @Header(HttpConfig.HTTP_HEADER_DOWNLOAD_APK_KEY) String identifier);

    /**
     * 获取版本号
     * url_type:official 正式接口
     *
     * @param url
     * @param sys
     * @return
     */
    @Headers({"url_type:official"})
    @POST
    @FormUrlEncoded
    Observable<UpdateInfoBean> getVersion(@Url String url, @Field("sys") String sys);

    /**
     * 登录
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/login/login")
    Observable<Response<RemoteLoginEntity>> login(@Body Params params);

    /**
     * 仓库
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/base/warehosue-list")
    Observable<Response<ArrayList<WarehouseEntity>>> getWarehouseList(@QueryMap Params params);

    /**
     * 会员
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/base/member-list")
    Observable<Response<ArrayList<MemberEntity>>> getMemberList(@QueryMap Params params);

    /**
     * 任务驱动判断
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/in-task/exists-in-temp")
    Observable<Response<Boolean>> taskFlowCheck(@QueryMap Params params);

    /**
     * 任务类型菜单列表
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/task/category-list")
    Observable<Response<RemoteEntity<TaskMenuEntity>>> taskMenuList(@QueryMap Params params);

    /**
     * 待办任务列表
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/task/pool-list")
    Observable<Response<RemoteEntity<TaskEntity>>> waitTaskList(@QueryMap Params params);

    @Headers({WES_IN})
    @GET("api/pda/task/pool-list")
    Observable<Response<RemoteEntity<TaskEntity>>> waitTaskList(@QueryMap Params params, @Query("Status") String status);

    /**
     * 我的任务列表
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/task/my-list")
    Observable<Response<RemoteEntity<TaskEntity>>> mineTaskList(@QueryMap Params params);

    /**
     * 任务详情
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/in-task")
    Observable<Response<TaskDetailEntity>> loadInDetail(@QueryMap Params params);

    /**
     * 领用任务
     *
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/task")
    Observable<Response<Long>> receiveTask(@QueryMap Params params);

    /**
     * 拒绝任务
     *
     * @return
     */
    @Headers({WES_IN})
    @PUT("api/pda/task/refuse/{workId}")
    Observable<Response<Object>> refuseTask(@Path(value = "workId") String workID);


    /**
     * 执行任务
     *
     * @return
     */
    @Headers({WES_IN})
    @PUT("api/pda/task/do-it")
    Observable<Response<Object>> executeTask(@QueryMap Params params);

    /**
     * 是否任务化单据
     *
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/in-task/exists/{inId}")
    Observable<Response<Boolean>> orderIsTask(@Path(value = "inId") String inId);

    /**
     * 获取可领用任务列表
     *
     * @return
     */
    @Headers({WES_IN})
    @GET("api/pda/in-task/available-list/{inId}")
    Observable<Response<RemoteEntity<TaskEntity>>> orderTaskList(@Path(value = "inId") String inId);

    /**
     * 获取当前操作员的订单任务
     *
     * @return
     */
    @Headers({WES_BATCH})
    @GET("api/pda/in-task-oSAppservice/work")
    Observable<Response<TaskEntity>> userOrderTask(@QueryMap Params params);

    /**
     * 获取当前操作员的订单任务
     *
     * @return
     */
    @POST("api/app/batch/check-sort-batch-status")
    Observable<Response<Boolean>> checkTaskIsEffective(@QueryMap Params params);

    /**
     * 领用订单任务
     *
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/task/order-work")
    Observable<Response<Long>> receiveOrderTask(@QueryMap Params params);

    /**
     * 入库单列表查询
     *
     * @param params 到货登记：1，入库清点：2，商品上架：3
     * @return
     */
    @Headers({WMS})
    @GET("api/app/base-bussiness/business-bill-list")
    Observable<Response<ArrayList<InOrderEntity>>> loadInOrderList(@QueryMap Params params);

    /**
     * 到货登记保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/order-in/in-arrival-save")
    Observable<Response<Object>> submitRegister(@Body Params params);

    /**
     * 到货登记保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/in-task/arrival")
    Observable<Response<Object>> submitRegisterTask(@Body Params params);

    /**
     * 入库清点 - 商品条码校验是否存在
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/order-in/judge-commodity")
    Observable<Response<InCommodityEntity>> checkCommodityCode(@QueryMap Params params);

    /**
     * 入库清点 - 入库清点明细
     *
     * @param params 必填【待清点：1，清单完成：2 待上架：3 已上架：4】
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/order-in/in-order-list")
    Observable<Response<ArrayList<InCommodityEntity>>> loadInInventoryCommodityList(@QueryMap Params params);

    /**
     * 入库清点 - 超收策略验证
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/order-in/judge-order-inventory")
    Observable<Response<Boolean>> verifyJudge(@QueryMap Params params);

    /**
     * 入库清点 - 逐件和批量清点保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/in-task/inventory")
    Observable<Response<Object>> submitBatchAndSingleInventory(@Body Params params);

    /**
     * 入库清点 - 箱唛清点保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/in-task/inventory-mark")
    Observable<Response<Object>> submitMarkInventoryTask(@Body Params params);

    /**
     * 入库无单清点 - 逐件和批量清点保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @PUT("api/app/order-in/have-order-inventory")
    Observable<Response<Object>> submitBatchAndSingleNoOrderInventory(@Body Params params);

    /**
     * 入库无单清点 - 箱唛清点保存
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @PUT("api/app/order-in/have-order-inventory-mark")
    Observable<Response<Object>> submitMarkNoOrderInventoryTask(@Body Params params);

    /**
     * 商品上架 - 入库商品上架明细
     *
     * @param params (1待上架 2已上架)
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/upshelves/up-shelves-detail-list")
    Observable<Response<ArrayList<InCommodityEntity>>> loadInShelfCommodityList(@QueryMap Params params);

    /**
     * 商品上架 - 入库箱唛上架明细
     *
     * @param params (1待上架 2已上架)
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/upshelves/up-shelves-detail-list")
    Observable<Response<ArrayList<InMarkCommodityEntity>>> loadInShelfMarkList(@QueryMap Params params);

    /**
     * 商品上架 - 扫描商品验证条码或箱唛，获取批次
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/upshelves/commodity-up-shelves")
    Observable<Response<InCommodityEntity>> checkShelfCommodityCode(@QueryMap Params params);

    /**
     * 商品上架 - 扫描验证库位
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @POST("api/app/upshelves/is-judge-pos-code")
    Observable<Response<Boolean>> checkShelfPosCode(@QueryMap Params params);

    /**
     * 商品上架 - 扫描箱唛，获取批次
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/upshelves/commodity-up-shelves")
    Observable<Response<ArrayList<InMarkEntity>>> checkShelfMarkCode(@QueryMap Params params);

    /**
     * 商品上架 - 批量和逐件提交
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @POST("api/app/upshelves/upshelves-work")
    Observable<Response<Object>> submitBatchAndSingleShelf(@Body Params params);

    /**
     * 商品上架 - 批量和逐件提交(任务)
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/in-task/upshelevs")
    Observable<Response<Object>> submitBatchAndSingleShelfTask(@Body Params params);

    /**
     * 商品上架 - 箱唛提交
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @POST("api/app/upshelves/box-up-shelves")
    Observable<Response<Object>> submitMarkShelf(@Body Params params);

    /**
     * 商品上架 - 箱唛提交（任务）
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/in-task/box-up-shelves")
    Observable<Response<Object>> submitMarkShelfTask(@Body Params params);

    /**
     * 拍照上传
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/pda/photo-upload/upload-pic")
    Observable<Response<Object>> uploadImg(@QueryMap Params params);


    /**
     * 拍照上传
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @Multipart
    @POST("api/pda/photo-upload/upload-pic")
    Observable<Response<Object>> uploadImg(@QueryMap Params params, @Part MultipartBody.Part[] part);

    /**
     * 二次分拨-获取明细
     *
     * @param params
     * @return
     */
    @GET("api/app/secondary-sort/batch-order-list")
    Observable<Response<List<DetachDetailBean>>> loadBatchDetail(@QueryMap Params params);

    /**
     * 二次分拨 - 检测容器是否可用
     *
     * @param params
     * @return
     */
    @POST("api/app/container-util/is-judge-container")
    Observable<Response<DetachBoxBean>> checkBox(@QueryMap Params params);


    /**
     * 二次分拨 - 容器绑定波次
     *
     * @param params
     * @return
     */
    @POST("api/app/container-util/bind-container")
    Observable<Response<Boolean>> batchBindBox(@Body Params params);

    /**
     * 二次分拨 - 确认分拨
     *
     * @param params
     * @return
     */
    @Headers({WES_SORT})
    @POST("api/app/secondary-sort/secondary-sort")
    Observable<Response<Object>> confirmDetach(@Body Params params);

    /**
     * 容器释放 - 检测容器是否可用并返回容器信息
     *
     * @param params
     * @return
     */
    @POST("api/app/container-util/is-judge-container-use")
    Observable<Response<DetachBoxBean>> getContainerMsg(@QueryMap Params params);

    /**
     * 容器释放
     *
     * @param params
     * @return
     */
    @POST("api/app/container-util/release-container")
    Observable<Response<Boolean>> containerRelease(@Body Params params);

    /**
     * 库存查询
     *
     * @param params
     * @return
     */
    @GET("api/app/pos-inventory/pos-inventory-data")
    Observable<Response<InventoryEntity>> getInventoryMsg(@QueryMap Params params);

    /**
     * 补货申请--查询库位
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/check-pos")
    Observable<Response<Object>> checkReplenishApplyPos(@QueryMap Params params);

    /**
     * 补货申请--查询库位商品信息
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/commdity")
    Observable<Response<RecordGoodsEntity>> getPosCommodityMsg(@QueryMap Params params);

    /**
     * 补货申请--确认提交
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/replenishment/replenishment-apply")
    Observable<Response<Object>> confirmReplenish(@Body Params params);

    /**
     * 分拣 - 根据面单号或波次号查询波次id
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/batch/batch-iD")
    Observable<Response<String>> getBatchIdByCode(@QueryMap Params params);

    /**
     * 分拣 - 波次列表
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/batch/batch")
    Observable<Response<Page<BatchInfoEntity>>> sortBatchList(@QueryMap Params params);

    /**
     * 分拣 - 绑定容器
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/container-util/bind-container")
    Observable<Response<Boolean>> sortBindContainer(@Body Params params);

    /**
     * 分拣 - 检查容器
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/container-util/is-judge-container")
    Observable<Response<ContainerEntity>> checkContainerUseState(@QueryMap Params params);

    /**
     * 分拣 - 检查单据绑定容器信息
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/container-bind-appservice/batch-bind-container")
    Observable<Response<ArrayList<BindInfoEntity>>> sortCheckBind(@QueryMap Params params);

    /**
     * 分拣 - 团购备货 - 确认上架
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/app/group-prepare-goods/comfirmshelves")
    Observable<Response<Object>> sortGroupConfirm(@Body Params params);

    /**
     * 分拣 - 团购备货 - 确认上架（任务）
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/pda/in-task/group-down")
    Observable<Response<Object>> sortGroupTaskConfirm(@Body Params params);

    /**
     * 团购领用任务 - 波次绑定的容器信息
     *
     * @param params
     * @return
     */
    @GET("api/app/batch/batch-bind-info ")
    Observable<Response<ObtainScanContainerEntity>> getBatchContainerMsg(@QueryMap Params params);

    /**
     * 团购领用任务 - 波次明细
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})//9000:api/app/batch/batch-detail
    @GET("api/app/group-prepare-goods/batch-detail")
    Observable<Response<BatchCommodityEntity>> sortBatchDetail(@QueryMap Params params);

    /**
     * 波次任务明细
     *
     * @param params
     * @return
     */
    @Headers({WMS})//9000:api/app/batch/batch-detail
    @GET("api/app/batch/batch-detail")
    Observable<Response<ArrayList<CommodityEntity>>> sortTaskBatchDetail(@QueryMap Params params);

    /**
     * 团购领用任务 - 获取已绑定信息
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/assembly/employees-lins-info")
    Observable<Response<ObtainBindEntity>> groupObtainBindInfo(@QueryMap Params params);

    /**
     * 团购领用任务 - 检验流水线
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/assembly/assembly-check")
    Observable<Response<ObtainBindEntity>> groupObtainCheckLine(@QueryMap Params params);

    /**
     * 团购领用任务 - 检验操作人
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/assembly/employees-check")
    Observable<Response<ObtainBindEntity>> groupObtainCheckOperator(@QueryMap Params params);

    /**
     * 团购领用任务 - 领用任务，绑定操作人和流水线
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/assembly/bind-assembly-line")
    Observable<Response<Object>> groupObtainBatch(@Body Params params);

    /**
     * 团购领用任务 - 绑定操作人和流水线（任务进入）
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/pda/in-task/bind-line")
    Observable<Response<Object>> groupTaskObtainBatch(@Body Params params);

    /**
     * 团购抽检 - 获取波次抽检数量查
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @GET("api/app/group-sampling/sampling-detail")
    Observable<Response<BatchCountEntity>> groupSamplingProgress(@QueryMap Params params);

    /**
     * 团购抽检 - 根据面单获取商品明细
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/batch/batch-order-detail")
    Observable<Response<ArrayList<SamplingCommodityEntity>>> groupSamplingCommodity(@QueryMap Params params);

    /**
     * 团购抽检 - 修改波次单的抽检状态 确认抽检
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/app/group-sampling/group-sampling")
    Observable<Response<Object>> groupSamplingSubmit(@Body Params params);

    /**
     * 团购抽检 - 修改波次单的抽检状态（任务）
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/pda/in-task/group-sampling")
    Observable<Response<Object>> groupTaskSamplingSubmit(@Body Params params);

    /**
     * 团购集货 - 波次列表
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/batch/batch")
    Observable<Response<Page<GroupBatchInfoEntity>>> groupBatchList(@QueryMap Params params);

    /**
     * 团购集货 - 获取推荐集货地
     *
     * @param params
     * @return
     */
    @GET("api/app/container-util/recommend-collect-containers")
    Observable<Response<CollectPlaceEntity>> groupCollectPlace(@QueryMap Params params);

    /**
     * 团购集货 - 波次绑定集货地
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/app/group-prepare-goods/bind-collect-containers")
    Observable<Response<Object>> confirmBindCollect(@Body Params params);

    /**
     * 团购集货 - 波次绑定集货地（任务）
     *
     * @param params
     * @return
     */
    @Headers({WES_GROUP})
    @POST("api/pda/in-task/group-jH")
    Observable<Response<Object>> confirmTaskBindCollect(@Body Params params);

    /**
     * 分拣 - 笼车分拣 - 边捡边分 - 订单明细
     *
     * @param params
     * @return
     */
    @Headers({WES_BATCH})
    @GET("api/app/cagecar-sort/sort-list-by-batch-iD")
    Observable<Response<ArrayList<SortCommodityEntity>>> sortBatchOrderDetail(@QueryMap Params params);

    /**
     * 分拣 - 订单拣选 - 获取已被领取的订单id
     *
     * @param params
     * @return
     */
    @Headers({WES_BATCH})
    @GET("api/pda/in-task-oSAppservice/work-by-iD")
    Observable<Response<ArrayList<TaskEntity>>> sortReceivedOrderId(@QueryMap Params params);

    /**
     * 分拣 - 订单拣选 - 获取未被领取的订单id
     *
     * @param params
     * @return
     */
    @Headers({WES_BATCH})
    @POST("api/app/cagecar-sort/un-sort-order-list")
    Observable<Response<ArrayList<Long>>> sortNoReceiveOrderId(@Body IdentityHashMap<String, Object> params);

    /**
     * 分拣 -  笼车 单SKU 散单 - 确认下架
     *
     * @param params
     * @return
     */
    @Headers({WES_BATCH})
    @POST("api/app/cagecar-sort/confirm-down-shelves")
    Observable<Response<Object>> sortBatchConfirm(@Body Params params);

    /**
     * 分拣 -  笼车 单SKU 散单 - 确认下架（任务）
     *
     * @param params
     * @return
     */
    @Headers({WES_BATCH})
    @POST("api/pda/in-task-oSAppservice/confirm-down-shelves")
    Observable<Response<Object>> sortTaskBatchConfirm(@Body Params params);

    /**
     * 还货 - 加载需还货商品信息
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/giveback-goods-appservice/z-cCommodity-by-mem")
    Observable<Response<List<CommodityEntity>>> loadRevertCommodity(@QueryMap Params params);

    /**
     * 还货 - 加载推荐可还货上架库位
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/giveback-goods-appservice/f-jPos-by-mem")
    Observable<Response<List<PosEntity>>> loadCommoditySortPos(@QueryMap Params params);


    /**
     * 还货 - 加载推荐可还货上架库位(用于多拣)
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/giveback-goods-appservice/f-jPos-by-mem")
    Observable<Response<List<CommodityEntity>>> morePickCommodityPos(@QueryMap Params params);

    /**
     * 还货 - 加载还货商品批次信息
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @GET("api/app/giveback-goods-appservice/batch-info-by")
    Observable<Response<ArrayList<RevertBatchEntity>>> upShelfPosAmount(@QueryMap Params params);

    /**
     * 还货 - 确认还货上架
     *
     * @param params
     * @return
     */
    @Headers({WES_INTERNAL})
    @POST("api/app/giveback-goods-appservice/return-commodity")
    Observable<Response<Object>> confirmUpShelf(@Body Params params);


    /**
     * 还货 - 加载推荐可还货上架库位(用于多拣)
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/box/box-print-list")
    Observable<Response<List<PrinterBoxEntity>>> getBoxPrinterMsg(@QueryMap Params params);

    /**
     * 退货登记 - 查询快递网点信息
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/express-delivery")
    Observable<Response<List<ExpressDeliveryEntity>>> getExpressDeliveryMsg(@QueryMap Params params);

    /**
     * 退货登记 - 查询快递单号是否是原单
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/return-regist/check-return-order")
    Observable<Response<ExpressDeliveryEntity>> checkTrackingNumber(@Body Params params);

    /**
     * 退货登记 - 确认登记
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/return-regist/return-register")
    Observable<Response<Object>> confirmReturnRegister(@Body Params params);

    /**
     * 退货清点 - 查询退货面单
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/order-commodity-msg")
    Observable<Response<InventoryInfoEntity>> getReturnedInfo(@QueryMap Params params);

    /**
     * 退货清点 - 检查商品
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/check-commdity")
    Observable<Response<InventoryInfoEntity.CommodityListBean>> checkReturnedCommodity(@QueryMap Params params);

    /**
     * 退货清点 - 检查容器
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/check-container")
    Observable<Response<ContainerEntity>> checkReturnedBox(@QueryMap Params params);

    /**
     * 退货清点 - 获取已清点明细
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/inventory-commodity")
    Observable<Response<ArrayList<InventoryDetailEntity>>> getReturnedInventoryDetail(@QueryMap Params params);

    /**
     * 退货清点 - 删除已清点商品
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @DELETE("api/app/return-regist/inventory")
    Observable<Response<Object>> deleteInventoryCommodity(@QueryMap Params params);

    /**
     * 退货清点 - 保存清点
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/return-regist/save-inventory")
    Observable<Response<Object>> submitReturnedInventory(@Body Params params);

    /**
     * 退货交接 - 查询容器商品信息
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @GET("api/app/return-regist/contain-commodity-info")
    Observable<Response<List<RelayBoxEntity>>> getContainCommodityMsg(@QueryMap Params params);

    /**
     * 退货交接 - 确认
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/return-regist/save-return-delivery")
    Observable<Response<Object>> saveReturnRelay(@Body Params params);

    /**
     * 移库下架 - 校验仓库
     *
     * @param params
     * @return
     */
    @GET("api/app/transfer-inventory/check-pos")
    Observable<Response<Integer>> transferDownCheckPos(@QueryMap Params params);

    /**
     * 移库下架 - 获取库位商品库存信息
     *
     * @param params
     * @return
     */
    @GET("api/app/transfer-inventory/commdity-by-pos-iD")
    Observable<Response<List<TransferCommodityEntity>>> transferCommodityMsg(@QueryMap Params params);

    /**
     * 移库下架 - 检测容器是否可用
     *
     * @param params
     * @return
     */
    @GET("api/app/transfer-inventory/check-container")
    Observable<Response<DetachBoxBean>> transferCheckContainer(@QueryMap Params params);

    /**
     * 移库下架 - 确认下架
     *
     * @param params
     * @return
     */
    @POST("api/app/transfer-inventory/confirm-down")
    Observable<Response<Object>> transferConfirmDown(@Body Params params);

    /**
     * 移库上架 - 获取库位商品库存信息和容器信息
     *
     * @param params
     * @return
     */
    @GET("api/app/transfer-inventory/up-query-storage")
    Observable<Response<List<TransferUpEntity>>> transferUpCommodityMsg(@QueryMap Params params);

    /**
     * 移库上架 - 确认上架
     *
     * @param params
     * @return
     */
    @POST("api/app/transfer-inventory/confirm-up")
    Observable<Response<Object>> transferConfirmUp(@Body Params params);

    /**
     * 退货面单查询 - 检测商品
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/")
    Observable<Response<TransferCommodityEntity>> returnCheckCommodity(@Body Params params);

    /**
     * 退货面单查询 - 确认查询
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/")
    Observable<Response<List<InvoiceEntity>>> returnOrderInquire(@Body Params params);

    /**
     * 退货面单查询 - 退货面单确认绑定发货单
     *
     * @param params
     * @return
     */
    @Headers({WES_IN})
    @POST("api/app/")
    Observable<Response<Boolean>> confirmToInventory(@Body Params params);

    /**
     * 补货 - 补货单列表
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/replenish-list")
    Observable<Response<ArrayList<ReplenishOrderEntity>>> loadReplenishOrderList(@QueryMap Params params);

    /**
     * 补货 - 补货单修改
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @PUT("api/app/replenishment/replenish-status")
    Observable<Response<Object>> loadReplenishOrderStatus(@QueryMap Params params);

    /**
     * 补货 - 补货单明细
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/replenish-detail")
    Observable<Response<ArrayList<ReplenishCommodityEntity>>> loadReplenishDownCommodity(@QueryMap Params params);

    /**
     * 补货 - 检查单据绑定容器信息
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/Check-Container-Bind")
    Observable<Response<ReplenishBindEntity>> replenishCheckBind(@QueryMap Params params);

    /**
     * 补货 - 绑定容器
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/container-util/bind-container")
    Observable<Response<Boolean>> replenishBindContainer(@Body Params params);

    /**
     * 补货 - 检测库位是否可用
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenishment/check-pos-commodity-match/{commodityId}")
    Observable<Response<ArrayList<ReplenishBatchEntity>>> checkReplenishDownPosCode(@Path("commodityId") long commodityId, @QueryMap Params params);

    /**
     * 补货 - 完结下架
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @PUT("api/pda/in-task/replenish-status")
    Observable<Response<ReplenishStateBean>> finishReplenishDown(@Body Params params);

    /**
     * 补货 - 确认下架
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/pda/in-task/replenish-down")
    Observable<Response<Object>> confirmReplenishDown(@Body Params params);

    /**
     * 补货 - 确认上架
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/pda/in-task/replenish-up")
    Observable<Response<Object>> confirmReplenishUp(@Body Params params);


    /**
     * 缺货查询 - 查询缺货商品
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @GET("api/app/replenish-manage/replenish-apply-and-oOS")
    Observable<Response<ArrayList<LackCommodityEntity>>> queryLackCommodity(@QueryMap Params params);

    /**
     * 缺货查询 - 创建补货单
     *
     * @param params
     * @return
     */
    @Headers({WMS})
    @POST("api/app/replenish-manage/replenish-order")
    Observable<Response<Long>> createReplenishOrder(@Body ArrayList<Params> params);
}


